package com.yejing;

import com.yejing.jooq.db.tables.daos.TblUserDao;
import com.yejing.jooq.db.tables.pojos.TblUser;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import java.util.List;

@ComponentScan
public class Section6Main {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(Section6Main.class);
        TblUserDao bean = context.getBean(TblUserDao.class);
        List<TblUser> all = bean.findAll();
        all.stream().forEach(e->{
            System.out.println(e.getName());
        });
    }
}